<div class="left-section">
    <h2>Ưu Đãi</h2>

    <?php if(count($this->data) > 0) :
        $common = new Default_Model_Common();
        $tag = new Default_Model_Tag();
        $sales = new Default_Model_Sales();
        $i = 0;
        foreach($this->data as $value) :
            $data = $sales->getHotelByType($value['type'], $value['type_id'], $this->lang);
            $name = $sales->getTypeById($value['type']);
            $i++;
            if($i == $this->data->getTotalItemCount()) :
    ?>
        <div class="item-last">
    <?php else : ?>
        <div class="item">
    <?php endif; ?>
            <img class="item-image" src="<?php echo $this->baseUrl('/public/files/'.$name.'/').$data['image'] ?>" />
            <div class="item-description">
                <a class="item-title" href="<?php echo $this->baseUrl($this->lang.'/'.$name.'/details?id='.$value['type_id']) ?>">
                    <?php echo $data['name'] ?>
                </a>
                <div class="item-tag">
                    Khu vực: <a class="item-name" href="<?php echo $this->baseUrl($this->lang.'/sales/tag?id='.$data['tag_id']); ?>">
                    </a>
                </div>
                <div class="description">
                    <?php echo $common->cut_string(strip_tags($data['description']), 300, 1) ?>
                </div>
                <span class="item-icon"></span>
                <a href="<?php echo $this->baseUrl($this->lang.'/sales/details?id='.$data['id']) ?>" class="item-continue button">chi tiết</a>
            </div>
        </div>
    <?php
        endforeach;
        else :
    ?>
        <p>Hiện không có ưu đãi nào</p>
    <?php endif; ?>

    <?php if(count($this->data) > 0) : ?>
        <div class="pagination">
            <?php echo $this->paginationControl($this->data, 'Sliding', 'sales/pagination.phtml') ?>
        </div>
    <?php endif; ?>
</div>

<?php echo $this->render('/right.phtml') ?>